[Bug]: alert “Facade many wrong JWT” with ‘Signature has expired’ triggered by UI

Repo: · Issue: #411 Status: Open · Priority: P2 Assignee: Raymond Labels: bug, security

Description

Caused by https://twill-network.slack.com/archives/C07TPN6FCBX/p1748943029423559

Steps to reproduce

To reproduce:

  1. Log into an account on staging
  2. Let the session expire
  3. Trigger any network request
  4. The app logs you out but sends repeated requests with the expired token
  5. Multiple duplicate toast alerts appear

What was the expected behavior?

  1. Log the user out
  2. Show a single toast alert
  3. Avoid repeated requests with the expired JWT

Actual behavior

Error logs from Facade:

2025-06-03 09:25:57.245|WARN|-no-tenant|auth:332|Invalid or wrongly signed JWT token, error='Signature has expired', from address='82.140.161.242',host='staging.twillai.com',user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36' token: eyJhbGciOiJ...

See alerts here

Implementation Notes

Dash adds notes here while working

Link to people, meetings, dependent tickets